package com.novaed.game.backend;

public class Paths {

	/* ******************** DEVELOPER'S NOTES ********************
	 * If you want to read a file from inside your application use:
	 * InputStream input = getClass().getResourceAsStream("/classpath/to/my/file");
	 * The path starts with "/", but that is not the path in your file-system, but in your classpath. 
	 * So if your file is at the classpath "org.xml" and is called myxml.xml your path 
	 * looks like "/org/xml/myxml.xml".
	 * 
	 * The InputStream reads the content of your file. 
	 * You can wrap it into an Reader, if you want.

	  //TODO - 
	 * Convert error messages to dialog boxes
	 * *********************************************************** */

	//TODO com-novaed-game #issue 1 Change to ClassPath
	public final static String WORKING_PATH = "./";

	public static String getWorkingPath() {
		return WORKING_PATH;
	}

	public static String getProfilePath() {
		return WORKING_PATH + "scores/";
	}

	public static String getQuestions() {
		return WORKING_PATH + "xml/questions.xml";
	}
	
	public static String getUsers() {
		return WORKING_PATH + "xml/users.xml";
	}
	
	public static String getResource(String input) {
		
		String res = null;
		
		if (input.equalsIgnoreCase("root")) {
			res = WORKING_PATH + "res/";
		}
		
		if (input.equalsIgnoreCase("menu")) {
			res = WORKING_PATH + "res/imgs/menu";
		}
		
		if (input.equalsIgnoreCase("sounds")) {
			res = WORKING_PATH + "res/sounds/";
		}
		
		return res;
	}
}